home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / utilsys / rss14gmd.lha / RSys_1.4gmd / C / GfxIntuiLists.c < prev    next >
C/C++ Source or Header  |  1996-05-04  |  16KB  |  696 lines

  1. /*
  2.    ***************************************************************************
  3.    *
  4.    * Datei:
  5.    *      RSysGfxIntuiLists.c
  6.    *
  7.    * Inhalt:
  8.    *
  9.    *      --- Globale Routinen ---
  10.    *
  11.    *    void MakeFontList ( void );
  12.    *    void MakeScreenList ( void );
  13.    *    void MakeWindowList ( void );
  14.    *    void RSysGadgetList ( void );
  15.    *    void RSysGetDisplayModes ( void );
  16.    *    void SysBlitterWaitList ( void );
  17.    *    void SysPubScreenList ( void );
  18.    *    void SysTOFWaitList ( void );
  19.    *
  20.    *      --- Lokale  Routinen ---
  21.    *
  22.    *    static void gadgetinfo ( GADGET *gad , int i );
  23.    *
  24.    * Bemerkungen:
  25.    *      Listen der Graphics- und Intuition-Library.
  26.    *      (Teilweise ausgelagert aus RSysSpecialLists.c)
  27.    *
  28.    * Erstellungsdatum:
  29.    *      07-Jul-93     Rolf Böhme
  30.    *
  31.    * Änderungen:
  32.    *      07-Jul-93     Rolf Böhme        Erstellung
  33.    *
  34.    ***************************************************************************
  35.  */
  36.  
  37. #include "RSys.h"
  38. #include "protos.h"
  39.  
  40.  /*
  41.   * MakeFontList() erzeugt eine Liste aller im System in der
  42.   * GfxBase definierten Fonts
  43.   */
  44. void
  45. MakeFontList (void)
  46. {
  47.   NODE *node;
  48.   TEXTFONT *font;
  49.   int i = 0;
  50.  
  51.   DPOS;
  52.  
  53.   countentries = CountNodes (&GfxBase->TextFonts);
  54.  
  55.   if (NoEntries ())
  56.     return;
  57.  
  58.   Entries = AllocScrollEntries (countentries);
  59.  
  60.   Forbid ();
  61.  
  62.   for (node = GfxBase->TextFonts.lh_Head; node->ln_Succ && (i < countentries); node = node->ln_Succ)
  63.     {
  64.       font = (TEXTFONT *) node;
  65.  
  66.       Entries[i].se_obj_id.address = font;
  67.       savestrcpy (Entries[i].se_obj_id.fullname, node, MAXFULLNAME - 1, NT_FONT);
  68.  
  69.       sprintf (Entries[i].se_Entry, EntryAttr[FONTS].ea_dataformat,
  70.            Entries[i].se_obj_id.address,
  71.            Entries[i].se_obj_id.fullname,
  72.            ((font->tf_Flags & FPF_DISKFONT) ? "Disk" : "ROM"),
  73.            font->tf_YSize,
  74.            font->tf_XSize,
  75.            font->tf_LoChar,
  76.            font->tf_HiChar);
  77.  
  78.       i++;
  79.     }
  80.  
  81.   countentries = i;
  82.  
  83.   Permit ();
  84.  
  85.   CreateEntryList (SORT, 9);
  86.  
  87.   return;
  88. }
  89.  
  90.  /*
  91.   * MakeWindowList() erzeugt eine Liste der offenen Windows im
  92.   * System. Dazu werden alle geöffneten Screens durchsucht
  93.   */
  94. void
  95. MakeWindowList (void)
  96. {
  97.   ULONG lock;
  98.   WINDOW *win;
  99.   SCREEN *scr;
  100.   char scrtitle[11];
  101.   int i = 0;
  102.  
  103.   DPOS;
  104.  
  105.   countentries = CountIntuiObjects ((int) GD_WindowsGad);
  106.  
  107.   if (NoEntries ())
  108.     return;
  109.  
  110.   Entries = AllocScrollEntries (countentries);
  111.  
  112.   lock = LockIBase (NULL);
  113.  
  114.   for (scr = IntuitionBase->FirstScreen; scr && (i < countentries); scr = scr->NextScreen)
  115.     for (win = scr->FirstWindow; win && (i < countentries); win = win->NextWindow)
  116.       {
  117.     Entries[i].se_obj_id.address = win;
  118.  
  119.     if ((char *) win->Title)
  120.       strncpy (Entries[i].se_obj_id.fullname, (char *) win->Title, MAXFULLNAME - 1);
  121.     else
  122.       strcpy (Entries[i].se_obj_id.fullname, field[NO_TITLE]);
  123.  
  124.     if ((char *) scr->DefaultTitle)
  125.       strncpy (scrtitle, (char *) scr->DefaultTitle, 10);
  126.     else
  127.       strcpy (scrtitle, field[NO_TITLE]);
  128.  
  129.     sprintf (Entries[i].se_Entry, EntryAttr[WINDOWS].ea_dataformat,
  130.          Entries[i].se_obj_id.address,
  131.          Entries[i].se_obj_id.fullname,
  132.          win->Height,
  133.          win->Width,
  134.          win->LeftEdge,
  135.          win->TopEdge,
  136.          scrtitle);
  137.  
  138.     i++;
  139.       }
  140.  
  141.   countentries = i;
  142.  
  143.   UnlockIBase (lock);
  144.  
  145.   CreateEntryList (SORT, 9);
  146.  
  147.   return;
  148. }
  149.  
  150.  /*
  151.   * MakeScreenList() erzeugt eine Liste aller geöffneten Screens
  152.   */
  153. void
  154. MakeScreenList (void)
  155. {
  156.   ULONG lock;
  157.   SCREEN *scr;
  158.   int i = 0;
  159.   char pub[5];
  160.  
  161.   DPOS;
  162.  
  163.   countentries = CountIntuiObjects ((int) GD_ScreensGad);
  164.  
  165.   if (NoEntries ())
  166.     return;
  167.  
  168.   Entries = AllocScrollEntries (countentries);
  169.  
  170.   lock = LockIBase (NULL);
  171.  
  172.   for (scr = IntuitionBase->FirstScreen; scr && (i < countentries); scr = scr->NextScreen)
  173.     {
  174.       Entries[i].se_obj_id.address = scr;
  175.  
  176.       if (scr->Title)
  177.     strncpy (Entries[i].se_obj_id.fullname, (char *) scr->Title, MAXFULLNAME - 1);
  178.       else
  179.     strcpy (Entries[i].se_obj_id.fullname, field[NO_TITLE]);
  180.  
  181.       strcpy (pub, "   ");
  182.  
  183.       if ((scr->Flags & WBENCHSCREEN) == WBENCHSCREEN)
  184.     pub[0] = 'W';
  185.  
  186.       if ((scr->Flags & PUBLICSCREEN) == PUBLICSCREEN)
  187.     pub[1] = 'P';
  188.  
  189.       if ((scr->Flags & CUSTOMSCREEN) == CUSTOMSCREEN)
  190.     pub[2] = 'C';
  191.  
  192.       sprintf (Entries[i].se_Entry, EntryAttr[SCREENS].ea_dataformat,
  193.            Entries[i].se_obj_id.address,
  194.            Entries[i].se_obj_id.fullname,
  195.            scr->Height, scr->Width, scr->LeftEdge, scr->TopEdge,
  196.            pub);
  197.  
  198.       i++;
  199.     }
  200.  
  201.   countentries = i;
  202.  
  203.   UnlockIBase (lock);
  204.  
  205.   CreateEntryList (SORT, 9);
  206.  
  207.   return;
  208. }
  209.  
  210.  /*
  211.   * SysPubScreenList() zeigt alle im System angemeldeten
  212.   * Public Screens an
  213.   */
  214. void
  215. SysPubScreenList (void)
  216. {
  217.   NODE *node;
  218.   SCREEN *scr;
  219.   PUBSCREENNODE *PSNodes;
  220.   LIST *PSList = NULL;
  221.   char name[20], taskname[16];
  222.   int i = 0;
  223.   NODE **adr;
  224.  
  225.   DPOS;
  226.  
  227.   HandleHelp (MN_SysPubScreenList);
  228.  
  229.   PrintHeader (SYSPUBSCR, NULL);
  230.  
  231.   EmptyListView ();
  232.  
  233.   PSList = LockPubScreenList ();
  234.   countentries = CountNodes (PSList);
  235.   UnlockPubScreenList ();
  236.  
  237.   if (NoEntries ())
  238.     return;
  239.  
  240.   PSNodes = (PUBSCREENNODE *) MyAllocVec (countentries * sizeof (PUBSCREENNODE),
  241.                       MEMF_ANY | MEMF_CLEAR, NO_KILL);
  242.   adr = (NODE **) MyAllocVec (countentries * sizeof (NODE *),
  243.                   MEMF_ANY | MEMF_CLEAR, NO_KILL);
  244.  
  245.   if (!PSNodes || !adr)
  246.     {
  247.       MyFreeVec (PSNodes);
  248.       MyFreeVec (adr);
  249.  
  250.       return;
  251.     }
  252.  
  253.   PSList = LockPubScreenList ();
  254.  
  255.   for (node = PSList->lh_Head; node->ln_Succ && (i < countentries); node = node->ln_Succ)
  256.     {
  257.       adr[i] = node;
  258.       CopyMem (node, &PSNodes[i++], sizeof (PUBSCREENNODE));
  259.     }
  260.  
  261.   UnlockPubScreenList ();
  262.  
  263.   Entries = AllocScrollEntries (countentries);
  264.  
  265.   for (i = 0; i < countentries; i++)
  266.     {
  267.       scr = PSNodes[i].psn_Screen;
  268.  
  269.       savestrcpy (name, &(PSNodes[i].psn_Node), 19, NT_UNKNOWN);
  270.  
  271.       Forbid ();
  272.  
  273.       if (PSNodes[i].psn_SigTask)
  274.     savestrcpy (taskname, &PSNodes[i].psn_SigTask->tc_Node, 15, NT_TASK);
  275.       else
  276.     strcpy (taskname, field[NO_TASK]);
  277.  
  278.       Permit ();
  279.  
  280.       Entries[i].se_obj_id.address = adr[i];
  281.       sprintf (Entries[i].se_Entry, EntryAttr[SYSPUBSCR].ea_dataformat,
  282.            adr[i],
  283.            name,
  284.            PSNodes[i].psn_VisitorCount,
  285.            taskname);
  286.     }
  287.  
  288.   MyFreeVec (PSNodes);
  289.   MyFreeVec (adr);
  290.  
  291.   CreateEntryList (SORT, 9);
  292.  
  293.   PrintStatistics ();
  294.  
  295. }
  296.  
  297.  
  298. void
  299. RSysGetDisplayModes (void)
  300. {
  301.   DISPLAYINFO dinfo;
  302.   NAMEINFO ninfo;
  303.  
  304.   RSYS_DisplayNode *dnode, *copydnode;
  305.  
  306.   NODE *dispnode;
  307.   LIST *DispList;
  308.   ULONG modeID = INVALID_ID;
  309.   REMEMBER *DispKey = NULL;
  310.   int i;
  311.  
  312.   DPOS;
  313.  
  314.   HandleHelp (MN_RSysGetDisplayModes);
  315.  
  316.   PrintHeader (DISPLAYMODES, NULL);
  317.  
  318.   EmptyListView ();
  319.  
  320.   DispList = AllocRemember (&DispKey, sizeof (LIST), MEMF_CLEAR);
  321.   if (DispList)
  322.     {
  323.       NewList (DispList);
  324.  
  325.       while ((modeID = NextDisplayInfo (modeID)) != INVALID_ID)
  326.     {
  327.       if (GetDisplayInfoData (NULL, (UBYTE *) & dinfo, sizeof (dinfo),
  328.                   DTAG_DISP, modeID))
  329.         {
  330.           if ((dinfo.NotAvailable == 0) && (modeID & MONITOR_ID_MASK))
  331.         {
  332.           /*
  333.            * Hier gelangt das Programm nur dann hin, wenn
  334.            * der Modus verfügbar ist und nicht der
  335.            * Default-Monitor benötigt wird, sondern ein
  336.            * PAL-, NTSC- oder andere Monitore
  337.            */
  338.           if (GetDisplayInfoData (NULL, (UBYTE *) & ninfo, sizeof (ninfo),
  339.                       DTAG_NAME, modeID))
  340.             {
  341.               if (dnode = AllocRemember (&DispKey, sizeof (RSYS_DisplayNode),
  342.                          MEMF_CLEAR | MEMF_PUBLIC))
  343.             {
  344.               if (dnode->dn_Node.ln_Name = AllocRemember (&DispKey,
  345.                        strlen ((char *) ninfo.Name) + 1,
  346.                           MEMF_CLEAR | MEMF_PUBLIC))
  347.                 {
  348.                   strcpy (dnode->dn_Node.ln_Name, (char *) ninfo.Name);
  349.  
  350.                   GetDisplayInfoData (NULL, (UBYTE *) & (dnode->dn_diminfo),
  351.                           sizeof (DIMENSIONINFO),
  352.                           DTAG_DIMS, modeID);
  353.  
  354.                   GetDisplayInfoData (NULL, (UBYTE *) & (dnode->dn_dinfo),
  355.                           sizeof (DISPLAYINFO),
  356.                           DTAG_DISP, modeID);
  357.  
  358.                   AddTail (DispList, (NODE *) dnode);
  359.                 }
  360.             }
  361.             }
  362.         }
  363.         }
  364.     }
  365.  
  366.       countentries = CountNodes (DispList);
  367.  
  368.       if (!NoEntries ())
  369.     {
  370.       Entries = AllocScrollEntries (countentries);
  371.  
  372.       for (dispnode = (NODE *) DispList->lh_Head, i = 0;
  373.            dispnode->ln_Succ && (i < countentries);
  374.            dispnode = dispnode->ln_Succ)
  375.         {
  376.           copydnode = (RSYS_DisplayNode *) dispnode;
  377.           Entries[i].se_obj_id.address = dispnode;
  378.           sprintf (Entries[i].se_Entry, EntryAttr[DISPLAYMODES].ea_dataformat,
  379.                Entries[i].se_obj_id.address,
  380.                copydnode->dn_Node.ln_Name,
  381.                copydnode->dn_diminfo.MaxDepth,
  382.                copydnode->dn_diminfo.MinRasterWidth,
  383.                copydnode->dn_diminfo.MinRasterHeight,
  384.                copydnode->dn_diminfo.MaxRasterWidth,
  385.                copydnode->dn_diminfo.MaxRasterHeight);
  386.  
  387.           i++;
  388.         }
  389.  
  390.       CreateEntryList (SORT, 9);
  391.     }
  392.  
  393.       FreeRemember (&DispKey, TRUE);
  394.  
  395.       PrintStatistics ();
  396.     }
  397.   else
  398.     ErrorHandle ("No memory for Displaynodes", MEMORY_ERR, ALLOC_FAIL, KILL);
  399.  
  400.   return;
  401. }
  402.  
  403. void
  404. SysTOFWaitList (void)
  405. {
  406.   NODE *node, **adr;
  407.   NODE *TWQNodes;
  408.   char name[20];
  409.   int i = 0;
  410.  
  411.   DPOS;
  412.  
  413.   HandleHelp (MN_SysTOFWaitList);
  414.  
  415.   PrintHeader (TOFWAIT, NULL);
  416.  
  417.   EmptyListView ();
  418.  
  419.   countentries = CountNodes (&GfxBase->TOF_WaitQ);
  420.  
  421.   if (NoEntries ())
  422.     return;
  423.  
  424.   TWQNodes = (NODE *) MyAllocVec (countentries * sizeof (NODE), MEMF_ANY | MEMF_CLEAR, NO_KILL);
  425.   adr = (NODE **) MyAllocVec (countentries * sizeof (NODE *), MEMF_ANY | MEMF_CLEAR, NO_KILL);
  426.  
  427.   if (!TWQNodes || !adr)
  428.     {
  429.       MyFreeVec (TWQNodes);
  430.       MyFreeVec (adr);
  431.  
  432.       return;
  433.     }
  434.  
  435.   Disable ();
  436.  
  437.   for (node = GfxBase->TOF_WaitQ.lh_Head; node->ln_Succ && (i < countentries); node = node->ln_Succ)
  438.     {
  439.       adr[i] = node;
  440.       CopyMem (node, &TWQNodes[i++], sizeof (NODE));
  441.     }
  442.  
  443.   Enable ();
  444.  
  445.   Entries = AllocScrollEntries (countentries);
  446.  
  447.   for (i = 0; i < countentries; i++)
  448.     {
  449.       savestrcpy (name, &TWQNodes[i], 19, NT_TASK);
  450.  
  451.       Entries[i].se_obj_id.address = &TWQNodes[i];
  452.       sprintf (Entries[i].se_Entry, EntryAttr[TOFWAIT].ea_dataformat,
  453.            adr[i],
  454.            name,
  455.            TWQNodes[i].ln_Pri);
  456.     }
  457.  
  458.   MyFreeVec (TWQNodes);
  459.   MyFreeVec (adr);
  460.  
  461.   CreateEntryList (SORT, 9);
  462.  
  463.   PrintStatistics ();
  464.  
  465.   return;
  466. }
  467.  
  468.  /*
  469.   * SysBlitterWaitList() erzeugt eine Liste aller Tasks,
  470.   * die auf den Blitter warten. Diese Liste ist in der
  471.   * GfxBase (graphics.library) zu finden
  472.   */
  473. void
  474. SysBlitterWaitList (void)
  475. {
  476.   NODE *node, **adr;
  477.   NODE *BWQNodes;
  478.   char name[20];
  479.   int i = 0;
  480.  
  481.   DPOS;
  482.  
  483.   HandleHelp (MN_SysBlitterWaitList);
  484.  
  485.   PrintHeader (BLITTERWAIT, NULL);
  486.  
  487.   EmptyListView ();
  488.  
  489.   countentries = CountNodes (&GfxBase->BlitWaitQ);
  490.  
  491.   if (NoEntries ())
  492.     return;
  493.  
  494.   BWQNodes = (NODE *) MyAllocVec (countentries * sizeof (NODE), MEMF_ANY | MEMF_CLEAR, NO_KILL);
  495.   adr = (NODE **) MyAllocVec (countentries * sizeof (NODE *), MEMF_ANY | MEMF_CLEAR, NO_KILL);
  496.  
  497.   if (!BWQNodes || !adr)
  498.     {
  499.       MyFreeVec (BWQNodes);
  500.       MyFreeVec (adr);
  501.  
  502.       return;
  503.     }
  504.  
  505.   Disable ();
  506.  
  507.   for (node = GfxBase->BlitWaitQ.lh_Head; node->ln_Succ && (i < countentries); node = node->ln_Succ)
  508.     {
  509.       adr[i] = node;
  510.       CopyMem (node, &BWQNodes[i++], sizeof (NODE));
  511.     }
  512.  
  513.   Enable ();
  514.  
  515.   Entries = AllocScrollEntries (countentries);
  516.  
  517.   for (i = 0; i < countentries; i++)
  518.     {
  519.       savestrcpy (name, &BWQNodes[i], 19, NT_TASK);
  520.  
  521.       Entries[i].se_obj_id.address = adr[i];
  522.       sprintf (Entries[i].se_Entry, EntryAttr[BLITTERWAIT].ea_dataformat,
  523.            adr[i],
  524.            name,
  525.            BWQNodes[i].ln_Pri);
  526.     }
  527.  
  528.   MyFreeVec (BWQNodes);
  529.   MyFreeVec (adr);
  530.  
  531.   CreateEntryList (SORT, 9);
  532.  
  533.   PrintStatistics ();
  534.  
  535.   return;
  536. }
  537.  
  538. static void
  539. gadgetinfo (GADGET * gad, int i)
  540. {
  541.   char title[15], typ[7];
  542.  
  543.   if (gad->GadgetText && gad->GadgetText->IText)
  544.     strncpy (title, (char *) (gad->GadgetText->IText), 15);
  545.   else if (gad->GadgetRender || gad->SelectRender)
  546.     strcpy (title, field[HAS_IMAGE]);
  547.   else
  548.     strcpy (title, field[NO_FIELD]);
  549.  
  550.   if (SETFLAG (gad, GTYP_SYSGADGET))
  551.     strcpy (typ, "SYS");
  552.   else if (SETFLAG (gad, GTYP_SCRGADGET))
  553.     strcpy (typ, "SCR");
  554.   else if (SETFLAG (gad, GTYP_GZZGADGET))
  555.     strcpy (typ, "GZZ");
  556.   else if (SETFLAG (gad, GTYP_REQGADGET))
  557.     strcpy (typ, "REQ");
  558.   else
  559.     strcpy (typ, "CUS");
  560.  
  561.   if (SETFLAG (gad, GTYP_WDRAGGING))
  562.     strcat (typ, "WDR");
  563.   else if (SETFLAG (gad, GTYP_SDRAGGING))
  564.     strcat (typ, "SDR");
  565.   else if (SETFLAG (gad, GTYP_WUPFRONT))
  566.     strcat (typ, "WUP");
  567.   else if (SETFLAG (gad, GTYP_SUPFRONT))
  568.     strcat (typ, "SUP");
  569.   else if (SETFLAG (gad, GTYP_WDOWNBACK))
  570.     strcat (typ, "WDO");
  571.   else if (SETFLAG (gad, GTYP_SDOWNBACK))
  572.     strcat (typ, "SDO");
  573.   else if (SETFLAG (gad, GTYP_CLOSE))
  574.     strcat (typ, "CLO");
  575.   else if (SETFLAG (gad, GTYP_BOOLGADGET))
  576.     strcat (typ, "BOO");
  577.   else if (SETFLAG (gad, GTYP_GADGET0002))
  578.     strcat (typ, "G02");
  579.   else if (SETFLAG (gad, GTYP_PROPGADGET))
  580.     strcat (typ, "PRO");
  581.   else if (SETFLAG (gad, GTYP_STRGADGET))
  582.     strcat (typ, "STR");
  583.   else if (SETFLAG (gad, GTYP_CUSTOMGADGET))
  584.     strcat (typ, "CUS");
  585.   else if (SETFLAG (gad, GTYP_SIZING))
  586.     strcat (typ, "SIZ");
  587.   else
  588.     strcat (typ, "UNK");
  589.  
  590.   Entries[i].se_obj_id.address = gad;
  591.   sprintf (Entries[i].se_Entry, EntryAttr[ALLGADGETS].ea_dataformat,
  592.        gad, title, typ, gad->LeftEdge, gad->TopEdge, gad->Width,
  593.        gad->Height);
  594.  
  595.   return;
  596. }
  597.  
  598.  /*
  599.   * MakeWindowList() erzeugt eine Liste der offenen Windows im
  600.   * System. Dazu werden alle geöffneten Screens durchsucht
  601.   */
  602. void
  603. RSysGadgetList (void)
  604. {
  605.   ULONG lock;
  606.   WINDOW *win;
  607.   SCREEN *scr;
  608.   GADGET *gad;
  609.   int i = 0;
  610.  
  611.   DPOS;
  612.  
  613.   HandleHelp (MN_RSysGadgetList);
  614.  
  615.   PrintHeader (ALLGADGETS, NULL);
  616.  
  617.   EmptyListView ();
  618.  
  619.   countentries = 0;
  620.  
  621.   PrintInfo ("Please wait! Lock Intuition...", NO_SPEAK, 0);
  622.  
  623.   lock = LockIBase (NULL);
  624.  
  625.   for (scr = IntuitionBase->FirstScreen; scr; scr = scr->NextScreen)
  626.     {
  627.       countentries++;
  628.  
  629.       for (gad = scr->FirstGadget; gad; gad = gad->NextGadget)
  630.     countentries++;
  631.  
  632.       for (win = scr->FirstWindow; win; win = win->NextWindow)
  633.     {
  634.       countentries++;
  635.  
  636.       if (win->FirstRequest)
  637.         for (gad = win->FirstRequest->ReqGadget; gad; gad = gad->NextGadget)
  638.           countentries++;
  639.  
  640.       for (gad = win->FirstGadget; gad; gad = gad->NextGadget)
  641.         countentries++;
  642.     }
  643.     }
  644.  
  645.   UnlockIBase (lock);
  646.  
  647.   if (NoEntries ())
  648.     return;
  649.  
  650.   Entries = AllocScrollEntries (countentries);
  651.  
  652.   PrintInfo ("Please wait! Lock Intuition again...", NO_SPEAK, 0);
  653.  
  654.   lock = LockIBase (NULL);
  655.  
  656.   for (scr = IntuitionBase->FirstScreen; scr && (i < countentries); scr = scr->NextScreen)
  657.     {
  658.       Entries[i].se_obj_id.address = scr;
  659.  
  660.       if (scr->Title)
  661.     sprintf (Entries[i++].se_Entry, "%08lX * SCR: %-20.20s *", scr, (char *) scr->Title);
  662.       else
  663.     sprintf (Entries[i++].se_Entry, "%08lX * SCR: %s *", scr, field[NO_TITLE]);
  664.  
  665.       for (gad = scr->FirstGadget; gad && (i < countentries); gad = gad->NextGadget)
  666.     gadgetinfo (gad, i++);
  667.  
  668.       for (win = scr->FirstWindow; win && (i < countentries); win = win->NextWindow)
  669.     {
  670.       Entries[i].se_obj_id.address = win;
  671.  
  672.       if ((char *) win->Title)
  673.         sprintf (Entries[i++].se_Entry, "%08lX ** WIN: %-20.20s **", win, (char *) win->Title);
  674.       else
  675.         sprintf (Entries[i++].se_Entry, "%08lX ** WIN: %s **", win, field[NO_TITLE]);
  676.  
  677.       if (win->FirstRequest)
  678.         for (gad = win->FirstRequest->ReqGadget; gad && (i < countentries); gad = gad->NextGadget)
  679.           gadgetinfo (gad, i++);
  680.  
  681.       for (gad = win->FirstGadget; gad && (i < countentries); gad = gad->NextGadget)
  682.         gadgetinfo (gad, i++);
  683.     }
  684.     }
  685.  
  686.   countentries = i;
  687.  
  688.   UnlockIBase (lock);
  689.  
  690.   CreateEntryList (NO_SORT, 0);
  691.  
  692.   PrintStatistics ();
  693.  
  694.   return;
  695. }
  696.